<script setup lang="ts">
import { useAssistStore } from '@/store/modules/Assist/useAssistStore';

const { disposalPlan } = storeToRefs(useAssistStore());
</script>

<template>
  <div class="blue-box">
    <template v-if="disposalPlan.imageUrl">
      <el-tooltip effect="dark" placement="left-end">
        <template #content>
          <span class="text-sm">
            {{ disposalPlan.planContent }}
          </span>
        </template>
        <el-image
          preview-teleported
          style="width: 100%; height: 100%"
          :src="disposalPlan.imageUrl"
          :preview-src-list="[disposalPlan.imageUrl]"
          :initial-index="0"
          fit="contain"
        />
      </el-tooltip>
    </template>
    <div class="empty-box" v-else>暂无预案</div>
  </div>
</template>

<style scoped lang="scss">
.blue-box {
  padding: 1.25rem;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  background-image: url(@/assets/largescreen/blue-kuang.png);
  background-size: 100% 100%;

  .dispose-box {
    width: 100%;
  }

  .empty-box {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #1aecff;
    font-weight: 400;
    font-size: 1.25rem;
  }
}
</style>
<style lang="scss">
.text-sm {
  white-space: pre-line;
  max-width: 300px;
  max-height: 70vh;
  display: block;
  overflow-y: auto;
}
</style>
